10 CLS:CLEAR ,,,32768!:RANDOMIZE TIMER:SCREEN 0,0,0:COLOR 15,0:KEY OFF
20 DIM CONDO(2050):GOSUB 2170:PLAY "L16 V7"
30 TYPE$="$$########,"
40 CLS:COLOR 13,0,3:INPUT"NUMBER OF TURNS (1-50)";TX:IF TX<1 OR TX>50 THEN TX=25
50 PRINT:PRINT:COLOR 10,0:INPUT"NUMBER OF PLAYERS";P:PX=P:IF P>10 OR P<1 THEN P=1
60 DIM Y(P,TX),F(20),P$(20)
70 PRINT
80 FOR R=1 TO P:IF (R XOR 1)+2=7 THEN SMCOL=1 ELSE SMCOL=0:COLOR (R XOR 1)+2,SMCOL:PRINT "PLAYER #";R;"'S NAME";:INPUT N$(R):NEXT R
90 CLS
100 O=P
110 DIM M(10)
120 FOR R=1 TO O:M(R)=25000:NEXT R
130 FOR DD=1 TO TX
140 FOR P=1 TO O:COLOR (P XOR 1)+2,0
150 IF M(P)<20000 THEN M(P)=20000
160 CLS
170 COLOR (P XOR 1)+2,0:PRINT N$(P);"'S TURN:"
180 GOSUB 890
190 GOSUB 1060  
200 GOSUB 1120 
210 GOSUB 1180 
220 GOSUB 1240 
230 LOCATE 1,20:PRINT N$(P);"'S CHOICE:#";DD
240 COLOR (P XOR 1)+2,0:PRINT
250 C=RND(1)*20002
260 PRINT"You have been offered a plot in ";P$;" which costs ";:PRINT USING TYPE$;C
270 PRINT"You have      :";:PRINT USING TYPE$;M(P)
280 PRINT
290 PRINT"The chances of natural disaster are:"
300 PRINT
310 PRINT
320 F=RND(1)*F:E=RND(1)*E
330 T=RND(1)*T:S=RND(1)*S
340 PRINT"CHANCE OF FLOOD:";TAB(40);:PRINT USING "###.##%";F;:PRINT TAB(55);STRING$(F/4,">")
350 PRINT"CHANCE OF EARTHQUAKE:";TAB(40);:PRINT USING "###.##%";E;:PRINT TAB(55);STRING$(E/4,">")
360 IN=0
370 PRINT"CHANCE OF TORNADO:";TAB(40);:PRINT USING "###.##%";T;:PRINT TAB(55);STRING$(T/4,">")
380 PRINT"CHANCE OF STORM:";TAB(40);:PRINT USING "###.##%";S;:PRINT TAB(55);STRING$(S/4,">"):PRINT:PRINT
390 IF M(P)<C+4000 THEN PRINT"Sorry- you don't have enough money!":Y(P,DD)=0:FOR R=1 TO 1000:NEXT R:GOTO 730
400 PRINT"Do you want to purchase this property? (Y/N)";:GOSUB 1300:A$=INKY$:PRINT:PRINT
410 IF LEFT$(A$,1)<>"Y" AND LEFT$(A$,1)<>"y" THEN Y(P,DD)=0:GOTO 730  :ELSE M(P)=M(P)-C
420 D=1
430 Y(P,DD)=1
440 IF M(P)<11000 THEN PRINT"Sorry- not enough money for insurance!":FOR R=1 TO 1000:NEXT R:IN=0:GOTO 460
450 PRINT"Would you like to buy insurance? ($7000 total)";:GOSUB 1300:IN$=INKY$:IF IN$="Y" OR IN$="y" THEN IN=2:M(P)=M(P)-7000
460 CLS:PRINT N$(P);"'S TURN: #";DD; "   Balance : ";:PRINT USING TYPE$;M(P);
470 PRINT:PRINT:PRINT"       Building Materials"
480 PRINT:PRINT
490 PRINT"1.) Best Selection ($10000 total)
500 PRINT"2.) Good Selection ($8000  total)"
510 PRINT"3.) Inferior       ($4000 total )"
520 PRINT:PRINT
530 PRINT"When using inferior materials, there is a chance of inspection"
540 PRINT:PRINT
550 PRINT"Enter type of building materials:";:GOSUB 1340:B=VAL(INKY$):PRINT:PRINT
560 B=INT(B)
570 IF B=1 AND M(P)<10000 THEN PRINT"Not Enough Money! ":FOR R=1 TO 1000:NEXT:GOTO 460  
580 IF B=2 AND M(P)<8000 THEN PRINT"Not enough money! ":FOR R=1 TO 1000:NEXT :GOTO 460  
590 IF B=2 THEN F=F+5:E=E+10:T=T+12
600 IF B=3 AND M(P)>30000 AND RND(1)*10<3 THEN Y(P,DD)=0:PRINT"INSPECTION!! YOU LOSE $20000!":M(P)=M(P)-20000:GOTO 730
610 IF B=3 AND M(P)<30000 AND RND(1)*10<3 THEN PRINT"INSPECTION! LOSE TURN!":FOR R=1 TO 1000:NEXT R:Y(P,DD)=0:GOTO 800
620 IF B<>1 AND B<>2 AND B<>3 THEN PRINT"UNACCEPTABLE NUMBER":FOR R=1 TO 1000:NEXT:GOTO 460
630 CLS:A=RND(1)*100
640 IF B=1 THEN M(P)=M(P)-10000:ELSE IF B=2 THEN M(P)=M(P)-8000:ELSE IF B=3 THEN M(P)=M(P)-4000
650 PRINT"The Building rises!  Spiraling towers and balconies glimmer in the sunlight!":PRINT:PRINT
660 IF B=3 AND A<11 THEN PLAY "EC":PRINT"INFERIOR MATERIALS! THE STRUCTURE IS UNSAFE! YOU LOSE $1000!":M(P)=M(P)-1000:Y(P,DD)=0:FOR R=1 TO 1000:NEXT :GOTO 730
670 A=RND(1)*100
680 IF A<F THEN PRINT"FLOOD! IT COLLAPSES!":GOSUB 1740:D=0:Y(P,DD)=0:GOTO 730  
690 IF A<F+E THEN PRINT"EARTHQUAKE SWALLOWS YOUR STRUCTURE UP!! YOU LOSE $800!":GOSUB 1910:Y(P,DD)=0:M(P)=M(P)-800:D=0:GOTO 730  
700 IF A<F+E+T THEN PRINT"TORNADO! HALF OF IT COLLAPSES! YOU LOSE ";:PRINT USING TYPE$;C/2;:PRINT" REPAIRING IT!":GOSUB 2090:M(P)=M(P)-C/2:Y(P,DD)=1:D=0
710 IF A<S+F+E+T THEN PLAY "BA":PRINT"STORM! YOU LOSE HALF YOUR PROFITS!":A=2:ELSE A=1
720 A=(RND(1)*20000+RND(1)*20000)/A:PRINT"You Earn ";:PRINT USING TYPE$;A:M(P)=M(P)+A
730 PRINT:FOR R=1 TO DD:IF Y(P,R)=1 THEN U=RND(1)*20000:PRINT"YOU EARN ";:PRINT USING TYPE$;U;:PRINT " FROM #";R:M(P)=M(P)+U
740 NEXT R
750 PRINT
760 PRINT"ACCOUNT BALANCE:";:PRINT USING TYPE$;M(P):PRINT
770 I$=INKEY$:IF I$="" THEN 770
780 IF D<>1 AND IN=2 THEN PRINT"INSURANCE REFUND: ";:R=RND(1)*19000+5000:PRINT USING TYPE$;R:M(P)=M(P)+R:FOR R=1 TO 1000:NEXT R
790 IN$="NO"
800 NEXT P
810 NEXT DD
820 FOR R=1 TO P:IF M(R)>MONEY THEN MONEY=M(R):PERSON$=N$(R)
830 NEXT R
840 PRINT PERSON$;" WITH ";:PRINT USING TYPE$;MONEY;:PRINT " WINS!!!"
850 PRINT:PRINT"THE STATISTICS AT THE END OF THE GAME ARE:":PRINT
860 FOR R=1 TO PX:PRINT N$(R);" HAD ";:PRINT USING TYPE$;M(R):NEXT R
870 FOR R=1 TO 4000:NEXT R:GOSUB 1360
880 END
890 REM
900 RESTORE
910 FOR R=1 TO 20
920 READ P$(R)
930 NEXT R
940 X=CINT(RND(1)*19+1):P$=P$(X):IF X=0 THEN GOTO 940
950 RETURN
960 DATA "Key West","Miami","New Orleans","New York","Mississippi","Ontario","Scotland","Quebec","France","England"
970 DATA "Virginia","Washington","Maryland","California","Brazil","Middle East","South Africa","El Salvador","Argentina","Alaska"
980 DATA 20,40,10,5,10,9,15,15,10,12
990 DATA 30,14,04,20,13,2,5,9,12,1
1000 DATA 15,20,10,13,10,10,4,5,02,12,7
1010 DATA 24,09,29,50,16,15,35,26,02,9
1020 DATA 10,30,02,4,14,10,10,14,5,10
1030 DATA 26,10,24,53,13,2,10,13,25,13
1040 DATA 40,50,20,90,30,30,12,14,23,60
1050 DATA 65,56,12,70,56,20,23,87,23,45
1060 REM
1070 FOR R=1 TO 20
1080 READ F(R)
1090 NEXT R
1100 F=F(X)
1110 RETURN
1120 REM
1130 FOR R=1 TO 20
1140 READ F(R)
1150 NEXT R
1160 E=F(X)
1170 RETURN
1180 REM
1190 FOR R=1 TO 20
1200 READ F(R)
1210 NEXT R
1220 T=F(X)
1230 RETURN
1240 REM
1250 FOR R=1 TO 20
1260 READ F(R)
1270 NEXT R
1280 S=F(X)
1290 RETURN
1300 REM * inkey subroutine *
1310 INKY$=INKEY$:IF INKY$="" THEN 1310
1320 IF INKY$<>"Y" AND INKY$<>"y" AND INKY$<>"n" AND INKY$<>"N" THEN 1310
1330 RETURN
1340 INKY$=INKEY$:IF INKY$="" THEN 1340
1350 IF INKY$<>"1" AND INKY$<>"2" AND INKY$<>"3" THEN 1340:ELSE RETURN
1360 REM ** end finale **
1370 GOSUB 2520:CLS
1380 LINE (50,50)-(50,239):LINE -(320,239):LINE -(320,50):LINE -(50,50)
1390 LINE (50,230)-(320,230):LINE (170,230)-(170,239)
1400 LINE (190,230)-(190,239):LINE (180,230)-(180,239)
1410 PSET (178,235):PSET (182,235)
1420 PAINT (75,235),1,1:PAINT (300,235),1,1
1430 LINE (320,50)-(380,70):LINE -(380,230):LINE -(320,239)
1440 TILE$=CHR$(0)+STRING$(6,60)+CHR$(0)
1450 PAINT (55,55),TILE$,1
1460 TILE2$=STRING$(8,170)
1470 LINE (320,230)-(380,221):PAINT (325,230),1,1
1480 PAINT (325,200),TILE2$,1
1490 LINE (420,90)-(600,90):LINE -(639,110):LINE -(639,175)
1500 LINE -(600,185):LINE -(420,185):LINE -(420,90)
1510 LINE (600,90)-(600,185):LINE (600,175)-(639,165)
1520 PAINT (630,170),1,1
1530 LINE (420,175)-(600,175)
1540 LINE (500,175)-(500,185)
1550 LINE (510,175)-(510,185)
1560 LINE (520,175)-(520,185)
1570 PSET  (508,180):PSET (512,180)
1580 PAINT (450,180),1,1:PAINT (550,180),1,1
1590 TILE3$=CHR$(0)+CHR$(124)+STRING$(4,76)+CHR$(124)+CHR$(0)
1600 PAINT (450,100),TILE3$,1
1610 TILE4$=CHR$(187)+CHR$(238)
1620 PAINT (620,120),TILE4$,1
1630 CIRCLE (500,220),70,1,,,.2
1640 LOCATE 5,8:PRINT "CONTINENTAL CONDOMINIUMS"
1650 FOR T=1 TO 20
1660 T3=RND(1)*(200):T1=RND(1)*(50):T2=RND(1)*(20)
1670 CIRCLE (600-T3,50-T1),T2:PAINT (600-T3,50-T1),1,1
1680 NEXT T
1690 LOCATE 1,1:PRINT "TYPE ANY KEY TO PLAY AGAIN..."
1700 WHILE INKEY$=""
1710 LINE (500,220)-(500+RND(1)*(100)-50,220-RND(1)*50),CINT(RND(1))
1720 WEND
1730 GOSUB 2530:RUN
1740 REM ** FLOOD DEMO **
1750 IF SCRN=1 THEN GOSUB 2520:GOTO 1900
1760 GOSUB 2520:CLS:FOR R=0 TO 17
1770 IF R/2=INT(R/2) THEN ST=3.1415:EN=2*ST
1780 IF R/2<>INT(R/2) THEN ST=2*3.1415:EN=ST/2
1790 CIRCLE (R*40,100),20,1,ST,EN
1800 NEXT R
1810 LINE (100,150)-(100,239)
1820 LOCATE 15,15:PRINT "Continental"
1830 LINE (100,239)-(200,239):LINE -(200,150):LINE -(100,150)
1840 LINE (200,150)-(220,155):LINE -(220,230):LINE -(200,239)
1850 LINE (100,230)-(200,230):LINE -(220,220)
1860 PAINT (150,200),TILE$
1870 PAINT (210,200),TILE2$
1880 FOR R=1 TO 15:X=RND(1)*550+50:B=60-RND(1)*40:CIRCLE (X,B),RND(1)*30:PAINT (X,B),1,1:NEXT R
1890 SCRN=1
1900 PLAY "A":FOR R=1 TO 1000:NEXT R:GOSUB 2530:RETURN
1910 REM ** earthquake **
1920 IF SCRN=2 THEN GOSUB 2520:GOTO 2060
1930 GOSUB 2520
1940 CLS:LINE (100,5)-(200,5):LINE -(200,105):LINE -(100,105):LINE -(100,5)
1950 LINE (200,5)-(210,10):LINE -(210,102)
1960 LINE -(200,105)
1970 LINE (100,95)-(200,95):LINE -(210,92)
1980 PAINT (105,100),1,1:PAINT (205,95),1,1
1990 PAINT (105,10),CHR$(60),1:PAINT (205,25),TILE2$,1
2000 GET (100,5)-(210,105),CONDO:PUT (100,5),CONDO,XOR
2010 PSET (0,105)
2020 DRAW "F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20"
2030 PSET (0,145)
2040 DRAW "E10F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20F20E20"
2050 PAINT (0,125),CHR$(55)+CHR$(75),151
2060 FOR RR=1 TO 3:PUT (90,0),CONDO,XOR:PUT (110,15),CONDO:PUT (110,15),CONDO,XOR:PUT (90,0),CONDO:NEXT RR
2070 SCRN=2
2080 PLAY "AB":FOR R=1 TO 1000:NEXT R:GOSUB 2530:RETURN
2090 REM ** TORNADO DEMO **
2100 IF SCRN=3 THEN GOSUB 2520:GOTO 2160
2110 GOSUB 2520:X=1
2120 CLS:FOR R=239 TO 139 STEP -4
2130 X=X+5
2140 CIRCLE (SIN(R*2)*(X/3)+300,R),X,1,,,.15
2150 NEXT R
2160 PLAY "AB":FOR R=1 TO 1000:NEXT R:SCRN=3:GOSUB 2530:RETURN
2170 REM * TITLE SCREEN *
2180 GOSUB 2520
2190 CLS:PI=3.1415
2200 LINE (0,0)-(639,239),1,B
2210 TILE$=CHR$(0)+STRING$(6,60)+CHR$(0):TILE2$=STRING$(8,170)
2220 CIRCLE (50,120),50,1,.25*PI,1.75*PI,.65
2230 CIRCLE (150,120),50,1,,,.65
2240 LINE (210,82)-(210,160)
2250 LINE (210,82)-(300,160)
2260 LINE -(300,82)
2270 REM * 'D' *
2280 CIRCLE (330,120),60,1,1.5*PI,.5*PI,.55
2290 LINE (330,82)-(330,160)
2300 REM * O *
2310 CIRCLE (450,120),50,1,,,.65
2320 LINE (500,50)-(500,230):LINE -(600,230):LINE -(600,50)
2330 LINE -(500,50)
2340 LINE (600,50)-(620,65):LINE -(620,225):LINE -(600,230)
2350 LINE (540,220)-(540,230):LINE (550,220)-(550,230):LINE (560,220)-(560,230)
2360 LINE (500,220)-(600,220):LINE -(620,215)
2370 PAINT (505,223),1,1:PAINT (605,225),1,1
2380 PAINT (550,55),TILE$,1:PAINT (610,70),TILE2$,1:PAINT (565,225),1,1
2390 LOCATE 5,64 :PRINT "Continental"
2400 LOCATE 21,2:PRINT" Type ENTER to begin.."
2410 LOCATE 22,2:PRINT" Condominium: (c)1985 Alfred Funk"
2420 LOCATE 23,2:PRINT" Permission to copy if lines 40-60 retained in program."
2430 WHILE INKEY$=""
2440 XC=100:YC=50:R=75:R2=R/2:DC=3.1415/180
2450 FOR T=0 TO 355 STEP 36
2460 LINE (XC,YC)-(COS(T*DC)*R+XC,SIN(T*DC)*R2+YC),0
2470 LINE (XC,YC)-(COS(T*DC)*R+XC,SIN(T*DC)*R2+YC),1
2480 NEXT T
2490 WEND
2500 GOSUB 2530:RETURN
2510 STOP
2520 XP=POS(0):YP=CSRLIN:SCREEN 2,,1,1,0:WINDOW SCREEN (0,0)-(639,239):PALETTE 0,1:RETURN
2530 SCREEN 0,0,0,0,0:LOCATE YP,XP:COLOR (P XOR 1)+2,SMCOL:RETURN
